package com.gouqi.lpl.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gouqi.lpl.domain.Mvp;
import com.gouqi.lpl.mapper.MvpMapper;
import com.gouqi.lpl.service.MvpService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MvpServiceImpl extends ServiceImpl<MvpMapper, Mvp>
        implements MvpService {

    @Resource
    private MvpMapper mvpMapper;

    @Override
    public List<Mvp> getMvp() {
        LambdaQueryWrapper<Mvp> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.orderBy(true, false, Mvp::getValue);
        List<Mvp> mvpList = mvpMapper.selectList(queryWrapper);
        return mvpList;
    }
}




